home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / metamail / contrib / ServiceMail / INSTALL < prev    next >
Encoding:
Text File  |  1993-05-07  |  8.3 KB  |  211 lines

  1.               Installing the ServiceMail toolkit v2.0
  2.  
  3. This file contains detailed instructions on installing ServiceMail,
  4. including a full description of all the configuration parameters.
  5.  
  6. OVERVIEW:
  7. For those who hate reading installation instructions, this should
  8. be enough to get you going, especially if your configuration is
  9. simple.
  10.  
  11. 1) edit 'conf.h' in this directory to reflect your desired
  12.    configuration.
  13. 2) type 'make'
  14. 3) type 'make install'
  15. 4) if you're using the queueing software, start the dispatcher
  16.    by running $(BINDIR)/restart_dequeue. You may want to add
  17.    this to your /etc/rc.local or something.
  18.  
  19. GENERAL INFORMATION + TOUR:
  20. The core of ServiceMail is the MIME parser and Tcl interpreter,
  21. 'mesh'. This version of ServiceMail includes extensive queueing
  22. and traffic control facilities to minimize load on the server in
  23. high traffic situations. If this is your situation, you will want to
  24. install those as well. The queuing facilities are split between
  25. a queuer 'pdinq' which logs and tags incoming messages and
  26. a dispatcher daemon 'dspd' which arranges to execute mesh jobs.
  27.  
  28. As originally written, ServiceMail was intended to have it's
  29. own user (canonically, services) assigned to it, and it was
  30. arranged that mesh was run from that user's .forward file.
  31. The current version, however, can be installed in any directory,
  32. and aliases can be used instead of a .forward file. By default,
  33. the .forward method is turned on and the aliases method is turned
  34. off, but you can run either or both. (You could even run neither,
  35. but then ServiceMail wouldn't do anything very useful.)
  36.   
  37. 1. CONFIGURATION:
  38. Each of the options in 'conf.h' is discussed in some detail below.
  39. Notice that conf.h will eventually be incorporated into a Makefile,
  40. so $(FOO) style macroes are fine, but you should be careful
  41. about tabs and spaces. If you edit conf.h, you will have to remake
  42. everything. To ensure this, you should make clean before you
  43. make if you have made the distribution before.
  44.  
  45. CC -- set this to the name of the C compiler you are going to want to
  46.   use. Any flags you want to pass should also be on this line.
  47.   e.g. 'CC=/usr/local/bin/gcc -Wall'.
  48.   ServiceMail is written in K&R style C, so pretty much any
  49.   C compiler should work. It compiles fine under Sun cc. 
  50.  
  51. TOPDIR -- the directory where you wish ServiceMail to think
  52.   of itself as living. Probably the directory in which you
  53.   unpacked the distribution.
  54.  
  55. TMPDIR -- Where to put temporary files. On almost all systems, this
  56.   is /tmp.
  57.  
  58. MAILER -- The full pathname (and flags, if necessary) to use for
  59.   the mailer for outgoing mail. If you have installed Nathaniel
  60.   Borenstein's 'metamail' package, you should have 'splitmail'
  61.   installed and that is what ServiceMail uses by default. You can
  62.   use sendmail, but it doesn't know anything about MIME-compliant
  63.   message splitting, so you may have problems with very large
  64.   messages being truncated by gateways and the like.
  65.   
  66. FORWARD -- Set this variable to 'forward' if you want to use
  67.   the .forward file method of getting ServiceMail running.
  68.  
  69. ALSDIR -- In order to permit aliases to be changed by
  70.   ServiceMail (as opposed to root), aliases should be done
  71.   by having each alias in /etc/aliases include a file from
  72.   some directory which is writable by ServiceMail. You'll
  73.   have to write those lines (in /etc/aliases) as root, though,
  74.   so this is useful mainly for traffic control. (If you're using
  75.   queuing, you can shut down aliases and then restart them.) In
  76.   any case, this is the directory where aliases are kept. By
  77.   default $(TOPDIR)/aliases
  78.  
  79. SRCDIR -- where the sources live. This is normally in the
  80.   src subdirectory of where you unpacked the distribution, and
  81.   frankly, I don't advise changing this. I don't guarantee that
  82.   things will compile if you do.
  83.  
  84. SERVSRC -- Where Tcl scripts go. This is nominally in src/services,
  85.   but it can be changed by changing it here. It will get hardwired
  86.   in by compilation, though.
  87.  
  88. TCLLIBDIR -- Where the Tcl library lives. If you have installed
  89.   Tcl somewhere, this should be the directory where libtcl.a lives.
  90.   If not, it should be src/mesh/tcl. (The Makefile is set up for
  91.   that). If you have already installed Tcl, you will want to
  92.   comment out TCLSRCDIR and TCLBUILD.
  93.  
  94. TCLSRCDIR -- Where the Tcl src lives. Likely $(SRCDIR)/mesh/tcl.
  95.  
  96. TCLBUILD -- Set this to libtcl.a
  97.  
  98. MFLAGS & FACILITY -- ServiceMail can be configured to do logging
  99.   via BSD style syslog(3). If you want to do this, you should
  100.   uncomment these macros, set MFLAGS to '-DUSESYSLOG' and FACILITY
  101.   to the symbolic name of the facility you want to log as. e.g.
  102.   LOG_LOCAL6. For more information, RTFM syslog(3).
  103.  
  104. If you want to use the queuing stuff, you will want to uncomment and
  105. edit the stuff under 'A.' and comment out the stuff under 'B.'
  106. Otherwise, you will want to just edit the stuff under 'B.'.
  107.  
  108. A.
  109. SPOOLDIR -- the directory where incoming mail should be spooled
  110.   before processing. Should have enough space to handle your backlog
  111.   and be writable by the uid which you expect the dispatcher to
  112.   have. If it doesn't already exist, the Makefile will try to
  113.   make it when you 'make install', but if, like many people,
  114.   you want to use /usr/spool/foo, it will probably fail.
  115.  
  116. SVCDIVERTDIR -- The queueing stuff includes scripts to divert
  117.   individual services so that you can, for instance, repair bugs
  118.   in scripts without having the outside world know that one
  119.   of your services is down and without shutting down your entire
  120.   server. Messages diverted in this way will go in this
  121.   directory. (Might as well be under $(SPOOLDIR) and by default it is.)
  122.  
  123. MBXDIVERTDIR -- just like SVCDIVERTDIR but for diverted aliases.
  124.   The makefile will try to make both of these automagically.
  125.  
  126. DSPDFLAGS -- the flags to pass when the dispatching daemon is
  127.   started up. You should see dspd(1) for details. I have chosen
  128.   what I think are pseudo reasonable defaults. You may disagree.
  129.  
  130. TARGETS, FIRSTPROG -- just uncomment these, like it says in 'conf.h'
  131.  
  132. USEVFORK -- On old BSD systems, fork(2) required a full copy of
  133.   a process's memory space. vfork(2) did no memory copying and
  134.   was therefore much faster. On some new systems (notably SunOS)
  135.   fork() is implemented with copy-on-write and is therefore
  136.   essentially as fast as fork(). If you are not on such a
  137.   system, you will want to uncomment USEVFORK.
  138.  
  139. USEVFORKH -- many systems have a header file vfork.h which should
  140.   be included when using vfork(). IF you have uncommented USEVFORK,
  141.   and yours is such a system, uncomment this line too.
  142.  
  143. NOSIGINTERRUPT -- BSD 4.3 derived systems should have automatically
  144.   restarted system calls. (SunOS does). If you don't, you may want to
  145.   uncomment NOSIGINTERRUPT. Since I don't have such a system,
  146.   it's hard to say. If you do, let me know what happens. On
  147.   SunOS or similar BSD-derived systems, you will want
  148.   to leave this line commented.
  149.   
  150. B.
  151. FIRSTPROG, TARGETS -- don't touch these, unless you are using
  152. queuing, in which case, you comment them out.  
  153.   
  154. 2. INSTALLATION:
  155.  
  156. Now that you've edited conf.h, type 'make'. Then go have a cup of
  157. coffee or something. make will recursively descend through the source
  158. tree, (hopefully) making everything on the way, which takes a few
  159. on a Sun 4/110, but may be faster on your machine. It will run
  160. 'config' in the Tcl src directory if you are building Tcl. You
  161. may want to look at config first, but there aren't a lot of user
  162. serviceable parts inside.
  163.  
  164. Once you've made the distribution, type 'make install'. This should
  165. be pretty fast, and will copy the binaries, man pages, etc into
  166. their appropriate places.
  167.  
  168. 3. SETUP:
  169.  
  170. If you are using queueing, you will want to arrange for the
  171. dispatcher daemon to run. You can start it by running
  172. $(BINDIR)/restart_dequeue. You may want to arrange to have this
  173. run in /etc/rc.local at boot time.
  174.  
  175. If you are using aliases, you will have to edit them into
  176. the /etc/aliases file yourself. Suppose that aliases were being
  177. written in /usr/foo/aliases, to make a mailbox called 'help', you
  178. would put a line in /etc/aliases that said:
  179. help: :include:/usr/foo/aliases/help
  180.  
  181. and then create a file '/usr/foo/aliases/help' which consisted
  182. of the line: 
  183. "|/usr/foo/bin/pdinq -d /usr/spool/servicemail"
  184.  
  185. (or one much like it. RTFM pdinq(1) for more details).
  186.  
  187. If you have enabled logging, you will want to configure your
  188. /etc/syslog.conf so that log messages go to the right place.
  189. RTFM syslog(3), syslog.conf(5), etc.
  190.  
  191. Other than that, you should be good to go.
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.   
  201.  
  202.  
  203.  
  204.   
  205.     
  206.  
  207.  
  208.  
  209.    
  210.  
  211.